home *** CD-ROM | disk | FTP | other *** search
- /*
- File: BaseStation.h
-
- Contains: Class to handle a base station
-
- Version: MacHack 2001
- */
-
- #ifndef __BASESTATION__
- #define __BASESTATION__
-
- // ---------------------------------------------------------------------------
- // includes
- // ---------------------------------------------------------------------------
-
- #include "WirelessAPI.h"
-
- class SectPoint
- {
- public:
- double fX;
- double fY;
- };
-
- class SectPoints
- {
- public:
- class BaseStation * fBaseStation1;
- class BaseStation * fBaseStation2;
- SectPoint fPoint1;
- SectPoint fPoint2;
- };
-
-
- // ---------------------------------------------------------------------------
- // classes
- // ---------------------------------------------------------------------------
-
- class BaseStation
- {
- public:
- BaseStation();
- virtual ~BaseStation();
-
- void UpdateInfo(WirelessNodeInfoPtr inBaseInfo);
-
- double fSignal;
- double fSignalAverage;
- double fNoise;
- UInt16 fMACAddress[3];
- double fX;
- double fY;
- const char* fName;
-
- Boolean fStrongSignal;
- double fR;
- };
-
- class BaseStationList
- {
- public:
- BaseStationList();
- virtual ~BaseStationList();
-
- void AddBase(WirelessNodeInfoPtr inBaseInfo);
-
- void IdleBases();
-
- void MapMyLocation();
-
- void FindIntersectionPoints(BaseStation * inBase1, BaseStation * inBase2, SectPoints & inSectPoint);
-
- void FindMostLikelyLocation(const SectPoints * inSectPoint, UInt32 inSectPointCount);
-
- double CalcDistanceSquared(const SectPoint & inPoint1, const SectPoint & inPoint2);
-
- BaseStation fBases[32];
- UInt32 fBaseCount;
- SectPoints fSectPoints[3];
-
- WirelessDeviceRef fRef;
-
- double fX;
- double fY;
- };
-
- #endif // __BASESTATION__
-